/**
 * 系统配置模块路由
 */
const pathName = '/config/'

const Config = resolve => {
    require.ensure(['admin/routers/config/config.vue'], () => {
        resolve(require('admin/routers/config/config.vue'))
    })
}

const Permission = resolve => {
    require.ensure(['admin/routers/config/permission.vue'], () => {
        resolve(require('admin/routers/config/permission.vue'))
    })
}

const Role = resolve => {
    require.ensure(['admin/routers/config/role.vue'], () => {
        resolve(require('admin/routers/config/role.vue'))
    })
}

const RoleUpdate = resolve => {
    require.ensure(['admin/routers/config/role_update.vue'], () => {
        resolve(require('admin/routers/config/role_update.vue'))
    })
}

const Admin = resolve => {
    require.ensure(['admin/routers/config/admin.vue'], () => {
        resolve(require('admin/routers/config/admin.vue'))
    })
}

const AdminUpdate = resolve => {
    require.ensure(['admin/routers/config/admin_update.vue'], () => {
        resolve(require('admin/routers/config/admin_update.vue'))
    })
}

const SmsTpl = resolve => {
    require.ensure(['admin/routers/config/sms/tpl.vue'], () => {
        resolve(require('admin/routers/config/sms/tpl.vue'))
    })
}
const SmsSet = resolve => {
    require.ensure(['admin/routers/config/sms/set.vue'], () => {
        resolve(require('admin/routers/config/sms/set.vue'))
    })
}

const RecordSystemLog = resolve => {
    require.ensure(['admin/routers/config/record/systemlog.vue'], () => {
        resolve(require('admin/routers/config/record/systemlog.vue'))
    })
}

const RecordSms = resolve => {
    require.ensure(['admin/routers/config/record/sms.vue'], () => {
        resolve(require('admin/routers/config/record/sms.vue'))
    })
}

const Category = resolve => {
    require.ensure(['admin/routers/config/category.vue'], () => {
        resolve(require('admin/routers/config/category.vue'))
    })
}

const Banner = resolve => {
    require.ensure(['admin/routers/config/banner.vue'], () => {
        resolve(require('admin/routers/config/banner.vue'))
    })
}



export default  [
	{ path: pathName + 'config' , component: Config },
   	{ path: pathName + 'permission' , component: Permission },
    { path: pathName + 'role' , component: Role },
   	{ path: pathName + 'role/update/' , component: RoleUpdate },
   	{ path: pathName + 'role/update/:id' , component: RoleUpdate },
   	{ path: pathName + 'admin' , component: Admin },
    { path: pathName + 'admin/update/' , component: AdminUpdate },
    { path: pathName + 'admin/update/:id' , component: AdminUpdate },
    { path: pathName + 'sms/tpl' , component: SmsTpl },
    { path: pathName + 'sms/set' , component: SmsSet },
   	{ path: pathName + 'record/sms' , component: RecordSms },
    { path: pathName + 'record/systemlog' , component: RecordSystemLog },
    { path: pathName + 'category' , component: Category },
    { path: pathName + 'banner' , component: Banner },
]